﻿// -----------------------------------------------------------------------
//  <copyright file="OnlineUser.cs" company="LiuliuSoft">
//      Copyright (c) 2025 66SOFT. All rights reserved.
//  </copyright>
//  <site>https://ifs.66soft.net</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025-09-27 13:09</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Identity;

/// <summary>
/// 在线用户信息
/// </summary>
public class OnlineUser
{
    public long Id { get; set; }
    public required string UserName { get; set; }
    public string? NickName { get; set; }
    public string? Email { get; set; }
    public string? Avatar { get; set; }
    public bool IsAdmin { get; set; }
    public string? SecurityStamp { get; set; }
    public string[] Roles { get; set; } = [];
    /// <summary>
    /// 在线用户的刷新令牌集合，Key:客户端标识，Value:刷新令牌，有值表示有在线
    /// </summary>
    public Dictionary<string, string> RefreshTokens { get; set; } = new();
    /// <summary>
    /// 用户扩展数据，存些乱七八糟的东西
    /// </summary>
    public Dictionary<string, string> ExtendData { get; set; } = new();
}